import { ApiVersoin } from '@/common/enums/httpEnum'

const Url = {
  causeList: `/customer-logouts/get-logout-cause-list`,
  logoutPhone: `/customer-logouts/get-phone`,
  sendPhone: `/customer-logouts/get-phone-code`,
  logoutsApply: `/customer-logouts/apply`,
  changePhoneNumber: `${ApiVersoin.V4}/customer-center/change-phone-number`,
  getPrivacy: `/privacy/get-privacy`,
}

export const causeList = (params) => uni.$uv.http.get(Url.causeList, { params, custom: { showLoading: true } })
export const logoutPhone = (params) => uni.$uv.http.get(Url.logoutPhone, { params, custom: { showLoading: true } })
export const sendPhone = (data) => uni.$uv.http.post(Url.sendPhone, data, { custom: { showLoading: true } })
export const logoutsApply = (data) => uni.$uv.http.post(Url.logoutsApply, data, { custom: { showLoading: true } })
export const changePhoneNumber = (data) => uni.$uv.http.post(Url.changePhoneNumber, data, { custom: { showLoading: true } })
export const getPrivacy = (params) => uni.$uv.http.get(Url.getPrivacy, { params, custom: { showLoading: true } })
